// 分类导航数据
import { findHeadCategory } from '@/api/home'

export default {
  namespaced: true,
  state: {
    navs: []
  },

  mutations: {
    //   存储navs
    setNavs (state, navs) {
      state.navs = navs
    }
  },
  actions: {
    async getNavsAction ({ commit }, payload) {
      const { result } = await findHeadCategory()
      console.log(result)
      commit('setNavs', result)
    }
  }
}
